package config

import (
	"errors"
	"fmt"
	"github.com/mattermost/viper"
	"zk1-project/pkg/global"
)

func InitConfig() {
	viper.SetConfigFile("../pkg/config/config.yaml")
	err := viper.ReadInConfig()
	if err != nil {
		panic(errors.New("viper配置读取失败"))
	}
	viper.Unmarshal(&global.Apps.Nacos)
	fmt.Println("viper配置读取成功")
}

const (
	AppId = "9021000140609857"
	//PrivateKey   = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCYRjsUERng6TXjgtKR7eiDcTCIrWNx8MOkcRsIjw5oUFrCKJSRQSW6kKoNK4xtX4/W2MHrF0HjcMfmmRPQ7CVuPdeHprKXxKm1JbjYDR2/ufk2IhC3pAuhQri+Z1cz+FIP5rRFtsy0A+t9F0OgbQ9J4EuBF9aCjSQw4NHQ9gFM+XhbHNaMUdv6OMSl3tKIaz8LYVSmB60cq/PeX7UN0KjxuGJ9O751QgUBIDU8NCL+Pf5ZMM8MfJi6dUJWIDQ+HWInR6q4yIWNV5qyJm0ipJaiOsbBPJCMOCYuxvHbXw5gNYa/40TzhXRk5SlDJ3itvDiss+2Q/woXCygELK6xS55PAgMBAAECggEAXITXYmLdkVzA5EHZRNcDHdHJBlIrCNCbXi9mmHWq8FBaRHu5gOPPU6KP376k7NNSJty+PeN8of8lRgOeGaNRPsEOUhpDipjv7+NCguq9N398XpqmA54Ffu52JyHMxwPKgGTRBUaC66EyFGftK+z3jBBeb8oXCG1PHu+KK+c8dRJr+EYk54SMwJJ4wzJPCLPzST2STCfX2aBvE5/2MyFP/5Z5AL/tJR23CPLdbYAYkZL347/oj6E48Ozc6QQH96RoQ925/TXb8CuF7JsFqDFPWdfMyWlp9p7bDVOpQL4jxngO8xuG5c3sEvQlbgAYTBb8o2NRxZ7r7Mkijn49srFvcQKBgQD4b6yKpYSI8ZWUxGgIL4SRp5MxVG0fKEBigQyAgAxdLevdHdVbEHflPMnnscCvcaVjlyXpSQVuLMfkt41MT897Jedmj31+o5OPlMn8ucNA6j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FAST_INSTANT_TRADE_PAY"
	Host         = " http://jv4t34.natappfree.cc "
	NotifyURL    = " http://jv4t34.natappfree.cc/v1/aliPayNotify"
	ReturnURL    = "http://jv4t34.natappfree.cc/v1/aliPayReturn"
)
